import Vue from 'vue'
import App from './App.vue'

Vue.config.productionTip = false
// 封装的调接口的方法
import request from "./resources/js/request"
Vue.prototype.$request = request;
import interceptor from "./api/axios.interceptor"
// 路由
import router from './router/router.js'
// ElementUI
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);
// bus总线
import VueBus from 'vue-bus'
Vue.use(VueBus)
// echarts图表
// import echarts from 'echarts'
// Vue.prototype.$echarts = echarts;
import * as echarts from 'echarts';
Vue.prototype.$echarts = echarts;
// datav
// 将自动注册所有组件为全局组件
import dataV from '@jiaminghi/data-view'

Vue.use(dataV)
// ElementUI里的loading样式
import { Loading } from 'element-ui'
Vue.prototype.openLoading = function () {
  const loading = Loading.service({
    lock: true,
    text: 'Loading',
    spinner: 'el-icon-loading',
    background: 'rgba(0, 0, 0, 0)'
  });
  return loading;
}
// 封装的一些公共样式
import "./resources/css/common.css";
import "./resources/css/styleInTable.less";
// Vuex
import store from './store'
// 百度地图
import BaiduMap from 'vue-baidu-map'
Vue.use(BaiduMap, {
  // ak 是在百度地图开发者平台申请的密钥
  ak: 'wn6aHucPEsscTTd3Dd87VOIo0gynBoMH'
})
new Vue({
  render: function (h) { return h(App) },
  router,
  store
}).$mount('#app')
